﻿using System;
using VisionCloud.Utility;

namespace VisionCloud.Domain.DtoModel.Applet.ResponseDto
{
    /// <summary>
    /// 用户信息
    /// </summary>
    public class UserInfoDto
    {
        private readonly string weburl = ConfigHelper.GetValue<string>("WebUrl");

        public Guid Id { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 公司名称
        /// </summary>
        public string CompanyName { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email { get; set; }

        /// <summary>
        /// 角色
        /// </summary>
        public string RoleName { get; set; }

        /// <summary>
        /// 电话号码
        /// </summary>
        public string PhoneNumber { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        public string Department { get; set; }

        /// <summary>
        /// 职位
        /// </summary>
        public string Position { get; set; }

        /// <summary>
        /// 用户手册文档地址
        /// </summary>
        public string UserDocument { get => !string.IsNullOrWhiteSpace(weburl) ? $"{weburl}/images/documents/UserGuide.pdf" : "https://blm.sit.bzlrobot.com/images/documents/UserGuide.pdf"; }

        /// <summary>
        /// 用户类型。
        /// 999为游客类型
        /// </summary>
        public int? UserType { get; set; }

        /// <summary>
        /// 是否有建模权限
        /// </summary>
        public bool IsEnableModeling { get; set; }

        /// <summary>
        /// 是否开启外立面权限
        /// </summary>
        public bool EnabledExternalWall { get; set; }

        /// <summary>
        /// 是否开启小程序采集权限0：未授权；1：已授权
        /// </summary>
        public bool EnabledAppletCollecting { get; set; }
    }
}